package com.torlesse.controller;

import com.torlesse.pojo.User;
import com.torlesse.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author ：torlesse
 * @date ：Created in 16:30 2021/8/8 0008
 * @description ：
 * @version: 1.0
 */
@CrossOrigin
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/{id}")
    public User findByUid(@PathVariable("id")Integer id){
        User user = userService.findByUid(id);
        System.out.println("调用provider===================0");
        return user;
    }
}
